<?php

/*
|--------------------------------------------------------------------------
| Web Routes
|--------------------------------------------------------------------------
|
| Here is where you can register web routes for your application. These
| routes are loaded by the RouteServiceProvider within a group which
| contains the "web" middleware group. Now create something great!
|
*/

Route::get('/', function () {
    return view('face.index');
});
Route::get('/news', function () {
    return view('face.news');
});
Route::get('/news/detail', function () {
    return view('face.newsdetail');
});
Route::get('/video', function () {
    return view('face.videoindex');
});
Route::get('/video/detail', function () {
    return view('face.videodetail');
});
Route::get('/base', function () {
    return view('layouts.face.app');
});
Route::get('/findus', function () {
    return view('face.findus');
});
Auth::routes();

Route::get('/home', 'HomeController@index')->name('home');

Route::post('/filestpm.html', 'Common\\WebUploaderCtrl@index');

Route::post('/webuplader.html', 'Common\\WebUploaderCtrl@move')->name('move.files');

Route::get('/wechat.php', 'Common\\WechatCtrl@index')->name('wechat.index');

Route::get('/wechat_checkSignature.html', 'Common\\WechatCtrl@checkSignature')->name('wechat.checkSignature');

Route::get('getwehcatnewlist.html', 'Common\\WechatCtrl@newslist');

Route::get('moveHtml.html', function () {
    foreach (\App\Model\Entity\Article::all() as $row) {
        if ($row->thumb_url !== '')
            continue;
        $filename = date('Y-m-d-H-i-s') . '-' . uniqid() . '.jpeg';
        $path = '/uploads/article/thumb/' . $filename;
        Storage::disk('uploads')->put($filename, file_get_contents($row->thumb_url));
        $row->thumb_url = $path;
        $row->save();
    }
});





























